package com.pig4cloud.pig.yu.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pig.buyan.entity.CarModel;
import com.pig4cloud.pig.buyan.entity.Style;
import com.pig4cloud.pig.qc.entity.LabelEntity;
import com.pig4cloud.pig.yu.entity.CarBrandEntity;
import com.pig4cloud.pig.yu.entity.CarInfoEntity;

import java.math.BigDecimal;
import java.util.List;

public interface CarInfoService extends IService<CarInfoEntity> {
    boolean existsByCarCode(String carCode);
	public IPage<CarInfoEntity> getCarInfoPage(Page<CarInfoEntity> page, CarInfoEntity carInfo, BigDecimal minPrice,
											   BigDecimal maxPrice);

	/**
	 * 查询品牌
	 */
	List<CarBrandEntity> getBrands(String series);

	/**
	 * 查询型号
	 */
	List<CarModel> getModels(Long brandId);

	/**
	 * 查询款式
	 */
	List<Style> getStyles(Long modelId);

	/**
	 * 查询所有标签
	 */
	List<LabelEntity> getAllLabel();


	CarInfoEntity getCarInfoById(Long infoId);
}